<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>箭头函数和结构</title>
</head>
<body>
<script>
    const person = {
        name: "jack",
        age: 21,
        language: ['java', 'js', 'css']
    };

    function hello(person) {
        console.log("hello," + person.name)
    }

    //结构和箭头函数的综合案例
    //原有的调用
    hello(person);

    //综合,这里的{name}就是解构,相当于 let {} =person
    // 结构可以理解为从对象或数组中取值
    let heihei=({name})=>console.log("hello,"+name);
    //调用的时候,一定要有那么name属性
    heihei(person)


</script>

</body>
</html>